package com.yixun.qfbao.model.enums;

public enum PremisesExceptionEnum {

    feature("feature","项目特色"),
    discount("discount","促销信息"),
    cooperation_rule("cooperation_rule","合作信息"),
    selling("selling","楼盘卖点"),
    customer("customer","目标客户"),
    sale_skill("sale_skill","拓客技巧"),
    introduction("introduction","项目介绍"),
    corporate_Desc("corporate_Desc","公司简介"),
    report_temp("report_temp","报备模板"),
    premises_address("premises_address","楼盘地址")
    ;
    private String code;
    private String name;

    PremisesExceptionEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getNameByCode(String code) {
        for (PremisesExceptionEnum item : PremisesExceptionEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getName();
            }
        }
        return null;
    }
}
